package org.yizn.rabbitmq.util;

import com.rabbitmq.client.ConnectionFactory;

/**
 * project : my-learn
 * <p> 封装工厂类 </p>
 *
 * @author yisl
 * @date 2022-07-26【星期二】
 **/
public class RabbitUtil {
    public static ConnectionFactory getConnectionFactory(){
        ConnectionFactory connectionFactory = new ConnectionFactory();
        connectionFactory.setHost("127.0.0.1");
        connectionFactory.setPort(5672);
        connectionFactory.setUsername("admin");
        connectionFactory.setPassword("admin");
        connectionFactory.setVirtualHost("my_vhost");
        return connectionFactory;
    }
}
